﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeDuce.IDAL;
using System.Data;

namespace SeDuce.BLL
{
    public class ArticleBLL
    {
        private static readonly IArticleDAL dal = SeDuce.DALFactory.DataAccess.CreateArticleDAL();

        public DataTable GetArticles()
        {
            return dal.GetArticles();
        }

        public DataTable GetArticleByType(int type)
        {
            return dal.GetArticleByType(type);
        }

        public DataTable GetArticleByTitle(string title)
        {
            return dal.GetArticleByTitle(title);
        }

        public DataTable GetArticleByID(int id)
        {
            return dal.GetArticleByID(id);
        }

        public bool UpdateArticle(SeDuce.Model.Article article)
        {
            return dal.UpdateArticle(article);
        }

        public bool InsertArticle(SeDuce.Model.Article article)
        {
            return dal.InsertArticle(article);
        }

        public bool DeleteArticle(int ID)
        {
            return dal.DeleteArticle(ID);
        }
    }
}
